using System;
using Domain.Engine;
using Microsoft.Practices.Unity;
using Service.Contract;
using SimpleCqrs;
using Unity.Wcf;

namespace Service
{
  public class WcfServiceFactory : UnityServiceHostFactory
  {
    protected override void ConfigureContainer(IUnityContainer container)
    {
      ISimpleCqrsRuntime runtime = new SimpleRuntime(container);
      runtime.Start();
      container
        .RegisterInstance(runtime)
        .RegisterType<IHelloService, HelloService>();
    }
  }
}